package cn.lena.weblog.dao;


import cn.lena.weblog.domain.Catagory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CatagoryDao {

	List<Catagory> findAll();

	List<Catagory> findByUserId(Integer userId);

	Catagory findOne(@Param("userId") Integer userId,@Param("catagoryId") Integer catagoryId);

	int addCatagory(Catagory catagory);

	int updateCatagory(Catagory catagory);

	int deleteCatagory(Catagory catagory);

	List<Catagory> findCollectByUserId(Integer userId);

}
